A Treaty of Friendship is intended to secure a permanent and lasting friendship between two factions. Once you have signed a Treaty, you will receive commerce benefits with your new friends. You may not, without diplomatic repercusisons, enter the territory of a faction you have a Treaty with.
A Treaty of Friendship terminates only if one faction attacks another or refuses a valid demand for withdrawal.